package com.atguigu.d_classloader;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Test {
    public static void main(String[] args) throws IOException {
        //IO流 : 起点-> 当前项目的根目录
        //FileInputStream fis = new FileInputStream("T_Day27\\src\\Login.properties");

        //类加载器 : 起点 -> 当前模块的src的根
        InputStream is = ClassLoader.getSystemResourceAsStream("Login.properties");

        //Properties 集合一键读取文件内容
        Properties properties = new Properties();

        properties.load(is);

        System.out.println("properties = " + properties);
    }
}
